package main

import "fmt"

// Runner 接口
type Runner interface {
	run()
}
type Car struct {
	brand string
}
type Dogll struct {
	name string
}

// Dog实现Runner接口
func (d Dogll) run() {
	fmt.Printf("%s正在吐舌头跑\n", d.name)
}

// Car实现Runner接口
func (c Car) run() {
	fmt.Printf("%s正在飞速行驶\n", c.brand)
}

func main() {
	var r Runner

	var d = Dogll{name: "旺财"}
	var c = Car{brand: "奔驰"}
	r = d
	r.run()
	r = c
	r.run()
}
